import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

public class MyTest {

    public static void main(String[] args) {
        System.out.println("start");
        try {
        Thread.sleep(10000);
    } catch (InterruptedException e) {
        e.printStackTrace();
    }
        System.out.println("end");
    }

    public void test01(){
        List<List<Integer>> res = new ArrayList<>();
        for (int i = 0; i < 3; i++) {
            ArrayList<Integer> list = new ArrayList<>();
            for (int j = 0; j < 5; j++) {
                list.add((int) (Math.random() * 100));
            }
            res.add(list);
        }

        // 嵌套列表转化为二维数组的写法
        int[][] ints = res.stream().map(x -> x.stream().mapToInt(Integer::intValue).toArray()).toArray(int[][]::new);
        System.out.println(Arrays.deepToString(ints));
    }

    public void test02(){
        Class<MyTest> myTestClass = MyTest.class;
        MyTest myTest = new MyTest();
        Class<? extends MyTest> aClass = myTest.getClass();
        /**
         * 结果为 true，表示一个类的 Class 对象在 JVM 中只有一个
         */
        System.out.println(myTestClass == aClass);
    }
}
